package com.study.talk.data.remote

import com.study.common.annotation.Desc
import com.study.talk.data.model.MomentComment
import com.study.talk.data.model.MomentLike
import com.study.talk.data.model.resp.MomentResponse
import com.study.talk.data.model.resp.ResultResponse
import com.study.talk.data.model.vo.MomentCommentVo
import com.study.talk.data.model.vo.MomentLikeVo
import com.study.talk.data.model.vo.MomentVo
import retrofit2.Response
import retrofit2.http.Body
import retrofit2.http.DELETE
import retrofit2.http.GET
import retrofit2.http.POST
import retrofit2.http.Path

interface MomentApi {

    @Desc("获取朋友圈的点赞列表")
    @GET("/moment_like/get/list/{momentId}")
    suspend fun getLikes(@Path("momentId") momentId: Int): Response<ResultResponse<List<MomentLike>>>

    @Desc("删除朋友圈评论")
    @DELETE("/moment_comment/delete")
    suspend fun deleteComment(@Body momentComment: MomentComment): Response<ResultResponse<List<MomentComment>>>

    @Desc("朋友圈评论")
    @POST("/moment_comment/add")
    suspend fun addComment(@Body momentCommentVo: MomentCommentVo): Response<ResultResponse<List<MomentComment>>>

    @Desc("更新点赞状态")
    @POST("/moment_like/add")
    suspend fun updateMomentLike(@Body momentLikeVo: MomentLikeVo): Response<ResultResponse<Int>>

    @Desc("根据userId获取朋友圈列表")
    @GET("/moment/get/friend/moment/{userId}")
    suspend fun getUserMoments(@Path("userId") userId:Int) : Response<ResultResponse<List<MomentResponse>>>

    @Desc("获取自己朋友圈")
    @GET("/moment/get/my/moment/{userId}")
    suspend fun getMyMoments(@Path("userId") userId : Int) : Response<ResultResponse<List<MomentResponse>>>

    @Desc("发布朋友圈")
    @POST("/moment/add")
    suspend fun addMoment(@Body momentVo: MomentVo): Response<ResultResponse<Boolean>>

}